#include "EpilFieldExpressionCode.h"
#include "EpilOutputHelper.h"
#include "TCharSupport.h"
#include "EpilPointerHelper.h"


EpilFieldExpressionCode::EpilFieldExpressionCode( const EpilLexLocation & location )
: EpilExpressionCodeBase( location )
, m_fieldName( t("") )
, m_tableExpression( NULL )
{
}


EpilFieldExpressionCode::~EpilFieldExpressionCode()
{
	EpilPointerHelper::SafeDelete( m_tableExpression );
}


tstring EpilFieldExpressionCode::ToEpilCode( int indent ) const
{
	tstringstream ret;
	ret << m_tableExpression->ToEpilCode();
	ret << t(".");
	ret << m_fieldName;
	return ret.str();
}